home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / p / pov / povlisti.ngs / truchet7.pov < prev    next >
Encoding:
Text File  |  1992-03-22  |  3.0 KB  |  105 lines

  1. // Persistence of Vision Raytracer Version 1.0
  2. // Image by Dan Farmer
  3. // 5x5x5 matrix of 3-path Truchet tiles
  4. #include "colors.inc"
  5. #include "shapes.inc"
  6. #include "textures.inc"
  7.  
  8. camera {
  9.     location <15 15 -45>
  10.     direction <0 0 4>
  11.     up  <0 1 0>
  12.     right <1.33333 0 0>
  13.     look_at <0 0 0>
  14. }
  15.  
  16. object {
  17.    light_source { <-10 25 -15>
  18.    color White
  19.    spotlight
  20.    point_at <0 0 0>
  21.    tightness 20
  22.    radius 8
  23.    falloff 15
  24.     }
  25. }
  26.  
  27. object { light_source { <15 50 50>  color SteelBlue } }
  28.  
  29.  
  30. #declare TTex = texture {
  31.     Shiny
  32.     color White
  33.     ambient 0.2
  34.     brilliance 3
  35. }
  36.  
  37.  
  38. //  Outer radius: 1.25  Inner radius: 0.75
  39. #declare Torus = quartic {
  40.    <    1.000000 0.000000 0.000000 0.000000 2.000000
  41.         0.000000 0.000000 2.000000 0.000000 -2.125000
  42.         0.000000 0.000000 0.000000 0.000000 0.000000
  43.         0.000000 0.000000 0.000000 0.000000 0.000000
  44.         1.000000 0.000000 0.000000 2.000000 0.000000
  45.         1.875000 0.000000 0.000000 0.000000 0.000000
  46.         1.000000 0.000000 -2.125000 0.000000 0.878906 >
  47.         texture { TTex }
  48. }
  49.  
  50. #declare Tile = object {
  51.     union {
  52.         quartic { Torus  rotate <90 0 0> translate <-1 1 0>   }
  53.         quartic { Torus  rotate <0 0 0>  translate <1 0 1>    }
  54.         quartic { Torus  rotate <0 0 -90> translate <0 -1 -1> }
  55.     }
  56.     clipped_by { box { UnitBox }}
  57.     bounded_by { box { UnitBox scale < 1.001 1.001 1.001> }}
  58. }
  59.  
  60. // Note that these can be applied in any order.
  61. #declare Tile1= object { Tile rotate <0  0 -180> }
  62. #declare Tile2= object { Tile rotate <0  0  -90> }
  63. #declare Tile3= object { Tile rotate <0  0    0> }
  64. #declare Tile4= object { Tile rotate <0  0   90> }
  65. #declare Tile5= object { Tile rotate <0  0  180> }
  66.  
  67. // Arrange 5 tiles into a row
  68. #declare T5x1x1 = composite {
  69.     object { Tile1 translate <-4 0 0>}
  70.     object { Tile2 translate <-2 0 0>}
  71.     object { Tile3 translate < 0 0 0>}
  72.     object { Tile4 translate <+2 0 0>}
  73.     object { Tile5 translate <+4 0 0>}
  74.     bounded_by {
  75.         box { UnitBox scale < 5.001 1.001 1.001> }
  76.     }
  77. }
  78.  
  79. // Arrange 5 rows into a 5x1x5 "plane"
  80. #declare T5x1x5 = composite {
  81.     composite { T5x1x1 rotate < 0  0  0> translate <0 0 -4> }
  82.     composite { T5x1x1 rotate < 0  0  0> translate <0 0 -2> }
  83.     composite { T5x1x1 rotate < 0  0  0> translate <0 0  0> }
  84.     composite { T5x1x1 rotate < 0  0  0> translate <0 0  2> }
  85.     composite { T5x1x1 rotate < 0  0  0> translate <0 0  4> }
  86.     bounded_by {
  87.         box { UnitBox scale < 5.001 1.001 5.001> }
  88.     }
  89. }
  90.  
  91. #declare T5x5x5 = composite {
  92.     composite { T5x1x5 rotate < 90  0  0> translate <0 -4 0> }
  93.     composite { T5x1x5 rotate <  0  0  0> translate <0  2 0> }
  94.     composite { T5x1x5 rotate <  0  0  0> translate <0  0 0> }
  95.     composite { T5x1x5 rotate <  0  0  0> translate <0 -2 0> }
  96.     composite { T5x1x5 rotate <-90  0  0> translate <0 -4 0> }
  97.     bounded_by {
  98.         box { UnitBox scale < 5.001 5.001 5.001> }
  99.     }
  100. }
  101.  
  102. composite { T5x5x5 }
  103.  
  104.  
  105.